|
Posizione nel menu |
---|
Mesh → Taglio → Rifila con un piano |
Ambiente |
Mesh |
Avvio veloce |
Nessuno |
Introdotto nella versione |
- |
Vedere anche |
Taglia la mesh, Rifila con un poligono |
Il comando Rifila con un piano taglia facce e parti di facce su un lato di un piano da un oggetto mesh.
See also: FreeCAD Scripting Basics.
To trim a mesh with a plane use its trimByPlane
method.
import FreeCAD as App
import Mesh
# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(30, 40, 50)
msh.ViewObject.DisplayMode = "Flat Lines"
# Define a plane by a base point and a normal vector:
pnt = App.Vector(25, 0, 0)
nor = App.Vector(0, 0, 1)
# We need to work on a copy of the msh.Mesh object:
new_msh = msh.Mesh.copy()
# Trim that copy:
new_msh.trimByPlane(pnt, nor)
# Update msh.Mesh:
msh.Mesh = new_msh